import request from '@/utils/requestH2'

/* 到账管理 */

// 新增到账
export function addAccountApi(data) {
  return request({
    url: '/account/addAccount',
    method: 'POST',
    data
  })
}

// 新增开票
export function addInvoicingApi(data) {
  return request({
    url: '/account/addInvoicing',
    method: 'POST',
    data
  })
}

// 到账列表查询
export function selAccountListApi(params) {
  return request({
    url: '/account/selAccountList',
    method: 'GET',
    params
  })
}

// 根据合同id查询到账详情列表
export function selAccountListByIdApi(pid) {
  return request({
    url: `/account/selAccountListById/${pid}`,
    method: 'GET'
  })
}

// 根据合同id查询开票详情列表
export function selInvoicingListByIdApi(pid) {
  return request({
    url: `/account/selInvoicingListById/${pid}`,
    method: 'GET'
  })
}

// 导出excel
export function accountExcelApi() {
  return request({
    url: "/filePreview/accountExcel",
    method: "GET",
  });
}
